package multipowny.ssrr;

public class Player {

	String name;
	int money = 15000;
	int movement;
	boolean diceTwice = false;
	int prisonCount = 0;
	int playerID;
	MultipownyActivity multipownyActivity;
	String ddLabel; //dice display label

	Dice dice1 = new Dice();
	Dice dice2 = new Dice();

	public Player(String theName, int theMoney, MultipownyActivity theMultipownyActivity) {
		name = theName;
		money = theMoney;
		multipownyActivity = theMultipownyActivity;
	}

	public String getName() {
		return name;
	}

	public int getMoney() {
		return money;
	}

	public void addMoney(int addMoney) {
		money = money + addMoney;
	}

	public void loseMoney(int lostMoney) {
		money = money - lostMoney;
	}

	public void throwDice(){
		dice1.gooi();
		dice2.gooi();
		movement = (dice1.ogen()+dice2.ogen());
		//if (dice1.ogen() == dice2.ogen()){
		//diceTwice = true;
		//prisonCount = prisonCount + 1;
		//if (prisonCount = 3){
		//active player naar gevangenis
		//prisonCount = 0;
	}
	//if (diceTwice == true){
	//button next player  --> throw dice button	}

	public void playerMove(){
		if ((movement + playerID) > 39){
			playerID=(playerID+movement)-40;
			this.addMoney(2000);
			ddLabel = multipownyActivity.activePlayer.name + "gooide " + dice1 + " & " + dice2 + "! En staat nu op vak " + playerID;
//			for (Square street: multipownyActivity.streetsList){
	//			if (street.getID() == playerID){
					
		//		}
			//};
		//	}
		//-40 omdat er 40 hokjes zijn en beginnen te tellen bij 0
	//	if (playerID == 0){
	//		Start.onStart();//op start voldoet aan if movement + playerID > 39 dus 2000 extra bij op start = 4000 totaal
		}
		if (playerID == 1){
			
		}
		if (playerID == 2){
			
		}
		if (playerID == 3){
			
		}
		if (playerID == 4){
			money=money-2000;
		}
		if (playerID == 5){
			
		}
		if (playerID == 6){
			
		}
		if (playerID == 7){
			
		}
		if (playerID == 8){
			
		}
		if (playerID == 9){
			
		}
		if (playerID == 10){ //doet niks want prison op bezoek
			
		}
		if (playerID == 11){
			
		}
		if (playerID == 12){
			
		}
		if (playerID == 13){
			
		}
		if (playerID == 14){
			
		}
		if (playerID == 15){
			
		}
		if (playerID == 16){
			
		}
		if (playerID == 17){
			
		}
		if (playerID == 18){
			
		}
		if (playerID == 19){
			
		}
		if (playerID == 20){
			money=money+2500;
		}
		if (playerID == 21){
			
		}
		if (playerID == 22){
			
		}
		if (playerID == 23){
			
		}
		
		/*if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}
		if (playerID == ){
			
		}*/
	}
	
	public void changeMoney(int change){
		money=money+change;
	}
	
}
